go/types.object.typ (field)

156 uses

	go/types (current package)
		alias.go#L139: 	if obj.typ == nil {
		alias.go#L140: 		obj.typ = a
		assignments.go#L122: 	if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
		assignments.go#L123: 		if lhs.typ == nil {
		assignments.go#L124: 			lhs.typ = Typ[Invalid]
		assignments.go#L132: 		if lhs.typ == nil {
		assignments.go#L133: 			lhs.typ = Typ[Invalid]
		assignments.go#L140: 	if lhs.typ == nil {
		assignments.go#L141: 		lhs.typ = x.typ
		assignments.go#L144: 	check.assignment(x, lhs.typ, "constant declaration")
		assignments.go#L157: 	if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) {
		assignments.go#L158: 		if lhs.typ == nil {
		assignments.go#L159: 			lhs.typ = Typ[Invalid]
		assignments.go#L166: 	if lhs.typ == nil {
		assignments.go#L172: 				lhs.typ = Typ[Invalid]
		assignments.go#L178: 		lhs.typ = typ
		assignments.go#L181: 	check.assignment(x, lhs.typ, context)
		assignments.go#L292: 		res = append(res, x.typ)
		assignments.go#L412: 			check.expr(newTarget(lhs.typ, desc), &x, orig_rhs[i])
		assignments.go#L432: 			if v.typ == nil {
		assignments.go#L433: 				v.typ = Typ[Invalid]
		assignments.go#L464: 		if v.typ == nil {
		assignments.go#L465: 			v.typ = Typ[Invalid]
		builtins.go#L1035: 			if hasVarSize(f.typ, seen) {
		call.go#L324: 		x.typ = sig.results.vars[0].typ // unpack tuple
		call.go#L414: 					resList[i] = &operand{mode: value, expr: e, typ: v.typ}
		call.go#L498: 				typ := last.typ.(*Slice).elem
		call.go#L656: 			check.assignment(a, sigParams.vars[i].typ, context)
		call.go#L749: 				x.typ = exp.typ
		call.go#L753: 				x.typ = exp.typ
		call.go#L756: 				x.typ = exp.typ
		call.go#L762: 				x.typ = exp.typ
		call.go#L765: 					x.typ = x.typ.(*Signature).results.vars[0].typ
		call.go#L769: 				x.typ = exp.typ
		call.go#L857: 		sig := m.typ.(*Signature)
		call.go#L904: 			x.typ = obj.typ
		call.go#L959: 			sig := *obj.typ.(*Signature)
		check.go#L235: 	alias.typ = Typ[Invalid]
		check.go#L242: 	alias.typ = typ
		cycles.go#L148: 			if !check.finiteSize(f.typ) {
		decl.go#L199: 			if check.inTParamList && isGeneric(obj.typ) {
		decl.go#L409: 	assert(obj.typ == nil)
		decl.go#L431: 			obj.typ = Typ[Invalid]
		decl.go#L434: 		obj.typ = t
		decl.go#L455: 	assert(obj.typ == nil)
		decl.go#L459: 		obj.typ = check.varType(typ)
		decl.go#L474: 			obj.typ = Typ[Invalid]
		decl.go#L482: 		check.expr(newTarget(obj.typ, obj.name), &x, init)
		decl.go#L500: 			lhs.typ = obj.typ
		decl.go#L518: 	assert(obj.typ == nil)
		decl.go#L525: 		if t := asNamed(obj.typ); t != nil { // type may be invalid
		decl.go#L743: 	base := asNamed(obj.typ) // shouldn't fail but be conservative
		decl.go#L814: 	assert(obj.typ == nil)
		decl.go#L820: 	obj.typ = sig // guard against cycles
		decl.go#L911: 							assert(obj.typ != nil)
		expr.go#L1302: 			list[i] = &operand{mode: value, expr: e, typ: v.typ}
		gcsizes.go#L44: 			if a := s.Alignof(f.typ); a > max {
		gcsizes.go#L89: 		a := s.Alignof(f.typ)
		gcsizes.go#L92: 		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
		gcsizes.go#L143: 		size := s.Sizeof(t.fields[n-1].typ)
		infer.go#L176: 		if isParameterized(tparams, par.typ) || isParameterized(tparams, arg.typ) {
		infer.go#L180: 				if !u.unify(par.typ, arg.typ, assign) {
		infer.go#L181: 					errorf(par.typ, arg.typ, arg)
		infer.go#L184: 			} else if _, ok := par.typ.(*TypeParam); ok && !arg.isNil() {
		infer.go#L335: 		tpar := params.At(index).typ.(*TypeParam) // is type parameter (no alias) by construction of untyped
		infer.go#L611: 			if w.isParameterized(m.typ) {
		infer.go#L644: 		if w.isParameterized(v.typ) {
		infer.go#L765: 			w.typ(m.typ)
		infer.go#L795: 		w.typ(v.typ)
		interface.go#L61: 		if sig := m.typ.(*Signature); sig.recv == nil {
		interface.go#L203: 			if named := asNamed(def.typ); named != nil {
		literals.go#L188: 				etyp := fld.typ
		literals.go#L215: 				etyp := fld.typ
		lookup.go#L213: 						assert(f.typ != nil)
		lookup.go#L232: 						typ, isPtr := deref(f.typ)
		lookup.go#L243: 					assert(m.typ != nil)
		lookup.go#L412: 			if !equivalent(f.typ, m.typ) {
		lookup.go#L456: 			if !equivalent(f.typ, m.typ) {
		lookup.go#L546: 			if f.embedded && (!isValid(f.typ) || hasInvalidEmbeddedFields(f.typ, seen)) {
		lookup.go#L579: 	w.signature(f.typ.(*Signature))
		methodset.go#L149: 						typ, isPtr := deref(f.typ)
		named.go#L325: 	if obj.typ == nil {
		named.go#L326: 		obj.typ = typ
		named.go#L356: 	obj.typ = typ
		named.go#L474: 	origSig := origm.typ.(*Signature)
		object.go#L100: 	typ       Type
		object.go#L120: func (obj *object) Type() Type { return obj.typ }
		object.go#L135: func (obj *object) setType(typ Type)          { obj.typ = typ }
		object.go#L268: 	switch t := obj.typ.(type) {
		object.go#L423: 	if obj.typ != nil {
		object.go#L424: 		return obj.typ.(*Signature) // normal case
		object.go#L448: func (obj *Func) Scope() *Scope { return obj.typ.(*Signature).scope }
		object.go#L476: 	if sig, _ := obj.typ.(*Signature); sig != nil && sig.recv != nil {
		object.go#L477: 		_, isPtr := deref(sig.recv.typ)
		object.go#L500: 	return &Label{object{pos: pos, pkg: pkg, name: name, typ: Typ[Invalid]}, false}
		object.go#L511: 	return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid]}, id}
		object.go#L656: 	if f.typ != nil {
		object.go#L657: 		sig := f.typ.(*Signature)
		predicates.go#L181: 			if comparableType(f.typ, dynamic, seen) != nil {
		predicates.go#L182: 				return typeErrorf("struct containing %s cannot be compared", f.typ)
		predicates.go#L300: 						!c.identical(f.typ, g.typ, p) {
		predicates.go#L322: 						if !c.identical(v.typ, w.typ, p) {
		predicates.go#L448: 					if f.Id() != g.Id() || !c.identical(f.typ, g.typ, q) {
		range.go#L123: 			assert(obj.typ == nil)
		range.go#L129: 				obj.typ = Typ[Invalid]
		range.go#L144: 			assert(obj.typ != nil)
		resolver.go#L639: 		if obj, _ := obj.(*TypeName); obj != nil && obj.typ != nil {
		selection.go#L100: 		sig := *s.obj.(*Func).typ.(*Signature)
		selection.go#L102: 		recv.typ = s.recv
		selection.go#L111: 		sig := *s.obj.(*Func).typ.(*Signature)
		selection.go#L114: 		arg0.typ = s.recv
		signature.go#L74: 		last := params.At(n - 1).typ
		signature.go#L456: 		last.typ = &Slice{elem: last.typ}
		signature.go#L457: 		check.recordTypeAndValue(list.List[len(list.List)-1].Type, typexpr, last.typ, nil)
		signature.go#L476: 	rtyp, _ := deref(recv.typ)
		signature.go#L510: 		check.errorf(pos, InvalidRecv, "invalid receiver type %s", recv.typ)
		sizes.go#L82: 			if a := s.Alignof(f.typ); a > max {
		sizes.go#L139: 		a := s.Alignof(f.typ)
		sizes.go#L142: 		if d := s.Sizeof(f.typ); d >= 0 && offs >= 0 {
		sizes.go#L216: 		size := s.Sizeof(t.fields[n-1].typ)
		sizes.go#L322: 		T = s.fields[i].typ
		subst.go#L291: 		if typ := subst.typ(v.typ); typ != v.typ {
		subst.go#L300: 	copy.typ = typ
		subst.go#L334: 		if typ := subst.typ(f.typ); typ != f.typ {
		subst.go#L343: 	copy.typ = typ
		typeparam.go#L52: 	if obj.typ == nil {
		typeparam.go#L53: 		obj.typ = typ
		typeset.go#L243: 					if pos.IsValid() && !check.allowVersion(go1_14) || !Identical(m.typ, other.Type()) {
		typestring.go#L171: 			w.typ(f.typ)
		typestring.go#L250: 				w.signature(m.typ.(*Signature))
		typestring.go#L350: 			w.typ(Unalias(t.obj.typ))
		typestring.go#L370: 		w.signature(m.typ.(*Signature))
		typestring.go#L453: 			typ := v.typ
		typestring.go#L502: 		w.typ(sig.results.vars[0].typ)
		unify.go#L522: 				if ym := ymap[xm.Id()]; ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
		unify.go#L543: 				if ym, _ := obj.(*Func); ym == nil || !u.nify(xm.typ, ym.typ, exact, p) {
		unify.go#L616: 						!u.nify(f.typ, g.typ, emode, p) {
		unify.go#L638: 						if !u.nify(v.typ, w.typ, mode, p) {
		unify.go#L713: 					if f.Id() != g.Id() || !u.nify(f.typ, g.typ, exact, q) {
		universe.go#L167: 	def(&Nil{object{name: "nil", typ: Typ[UntypedNil]}})
		validtype.go#L57: 			if !check.validType0(pos, f.typ, nest, path) {